package cn.appsys.service.BackendUser;

import cn.appsys.mapper.BackendUser.BackendUserMapper;
import cn.appsys.pojo.BackendUser;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
@Transactional
@Service
public class BackendUserServiceimpl implements BackendUserService {
    @Resource
    private BackendUserMapper backendUserMapper;
    @Override
    public BackendUser getLoginUser(String userCode,String userPassword) {
        BackendUser backendUser=backendUserMapper.getLoginUser(userCode);
        if(null!=backendUser){
            if(!backendUser.getUserPassword().equals(userPassword)){
                backendUser=null;
            }
        }
        return backendUser;
    }
}
